everai app
Manage app
Usage:
everai app [-h] {create,run,get,update,pause,resume,prepare,list,ls,queue,q,events,e,event,worker,workers,w,check,delete} ...
Commands:
createCreate an apprunLocal run a everai application for testgetGet app informationupdateUpdate an apppausePause an app, all worker will be stoppedresumeResume an apppreparePrepare an app, all of function which decorated by@app.preparewould be calledlist (ls)List all appsqueue (q)List queue of appevents (e, event)List events of appworker (workers, w)Manage the worker of appcheckCheck whether app is correct in app directorydeleteDelete an app
Options:
-h, --helpshow this help message and exit
everai app create
Create an app from manifest file or an App object in app.py.
--from-file indicates a manifest file for create app, otherwise, everai command line tool finds app setup in app.py.
Example:
everai app create
Usage:
everai app create [-h] [--dry-run] [-f FROM_FILE] [-n NAMESPACE]
Options:
-h, --helpshow this help message and exit--dry-rundry run in client-n NAMESPACE, --namespace NAMESPACEindicate namespace of the app, commandline > [yaml file |app.py] > default-f FROM_FILE, --from-file FROM_FILECreate app from manifest file (format in yaml), for example:--from-file filename
everai app run
Locally run a everai application for test
Example:
everai app run
Usage:
everai app run [-h] [--port PORT] [--listen LISTEN]
Options:
-h, --helpshow this help message and exit--port PORTThe port to bind to--listen LISTENThe specific network interface to bind the app's api endpoint service to restrict communication. It can be a specific IP address, for example: 192.168.1.123. Defaults to 0.0.0.0, which supports receiving traffic from any network interface.
everai app get
Get app information
Example:
everai app get <your app name>
Usage:
everai app get [-h] [--namespace [NAMESPACE]] [--output [OUTPUT]] name
Positional arguments:
nameThe app name
Options:
-h, --helpshow this help message and exit--namespace [NAMESPACE], -n [NAMESPACE]The namespace of app--output [OUTPUT], -o [OUTPUT]Output format, One of: (json, yaml, table, wide)
everai app update
Update an app from manifest file or an App object in app.py.
--from-file indicates a manifest file for update app, otherwise, everai command line tool finds App in app.py.
This operation may be trigger the worker rollout, if image, command ... changed.
For detailed guidance on app update, check out App Update.
Example:
everai app update
Usage:
everai app update [-h] [--dry-run] [-f FROM_FILE]
Options:
-h, --helpshow this help message and exit--dry-rundry run in client-f FROM_FILE, --from-file FROM_FILEUpdate app from manifest file (format in yaml), for example:--from-file <filename>
everai app pause
Pause an app, all worker will be stopped
Example:
everai worker list <your app name>
Show worker list of app,you can see 2 running workers. CREATED_AT and DELETED_AT use UTC time display.
ID                      STATUS    DETAIL_STATUS    CREATED_AT                DELETED_AT
----------------------  --------  ---------------  ------------------------  ------------
8UtmxyvQ4qC67awQMKDgJb  RUNNING   FREE             2024-06-26T08:54:23+0000
Q6FRr6sRVPwFyyMfDCCEFY  RUNNING   FREE             2024-06-26T08:54:23+0000
Run the following command to stop app of the example.
everai app pause <your app name>
Show the work list again, you can see nothing in worker list.
everai worker list <your app name>
ID    STATUS    DETAIL_STATUS    CREATED_AT    DELETED_AT
----  --------  ---------------  ------------  ------------
Run command everai app list, you can see that the status of app is PAUSED.
NAME                             NAMESPACE    STATUS    WORKERS    CREATED_AT
-------------------------------  -----------  --------  ---------  ------------------------
test-start-14                    default      PAUSED    0/0        2024-06-18T08:49:30+0000
Usage:
everai app pause [-h] [-n [NAMESPACE]] [--dry-run] name
Positional arguments:
nameThe app name
Options:
-h, --helpshow this help message and exit-n [NAMESPACE], --namespace [NAMESPACE]The namespace of app--dry-rundry run in client
everai app resume
Resume an app
Example:
When you want to resume an application that has been stopped (the application status is PAUSED), you can execute the following command:
everai app resume <your app name>
Usage:
everai app resume [-h] [-n [NAMESPACE]] name
Positional arguments:
nameThe app name
Options:
-h, --helpshow this help message and exit-n [NAMESPACE], --namespace [NAMESPACE]The namespace of app
everai app prepare
Prepare an app, all of function which decorated by @app.prepare would be called
Example:
Before your application is deployed in the cloud, you should construct your volume first, if your app uses at least one volume.
For production environment, the volumes are very important, you could call the following command to prepare it.
This command line will call all functions which are decorated by @app.prepare, in these functions you should set up volume data before the app use it.
everai app prepare
Usage:
everai app prepare [-h]
Options:
-h, --helpshow this help message and exit
everai app list (ls)
List all apps
Example:
everai app list
The result could be shown like this, and CREATED_AT uses UTC time display.
NAME       NAMESPACE    STATUS    WORKERS    CREATED_AT
---------  -----------  --------  ---------  ------------------------
get-start  default      DEPLOYED  3/3        2024-06-18T04:21:37+0000
Usage:
everai app list [-h] [-n NAMESPACE] [-A] [--output [OUTPUT]]
Options:
-h, --helpshow this help message and exit-n NAMESPACE, --namespace NAMESPACEList all apps in specified namespaces-A, --all-namespacesList all apps in all namespaces--output [OUTPUT], -o [OUTPUT]Output format, One of: (json, yaml, table, wide)
everai app queue (q)
List queue of app
Example:
everai app queue <your app name>
The output for this example is this, and CREATED_AT uses UTC time display.
  QUEUE_INDEX  CREATE_AT                 QUEUE_REASON
-------------  ------------------------  --------------
            0  2024-07-03T22:24:07+0000  WorkerBusy
            1  2024-07-03T22:24:07+0000  WorkerBusy
Usage:
everai app queue [-h] [-n [NAMESPACE]] [--output [OUTPUT]] name
Positional arguments:
app_nameThe app name
Options:
-h, --helpshow this help message and exit-n [NAMESPACE], --namespace [NAMESPACE]The namespace of app--output [OUTPUT], -o [OUTPUT]Output format, One of: (json, yaml, table, wide)
everai app event
List events of app
Example:
everai app event <your app name>
The output for this example is this, and CREATED_AT uses UTC time display.
TYPE    FROM       CREATED_AT                MESSAGE
------  ---------  ------------------------  ------------------------------------------------------------------------------------------------
NORMAL  AppSever   2024-06-25T12:27:05+0000  Worker/oFHDnZHrDMo5WHnQkhcegx is ready now
NORMAL  AppSever   2024-06-25T12:27:05+0000  Worker/jQd38Z5HwRLv24x459CSBG is ready now
NORMAL  Scheduler  2024-06-25T12:26:59+0000  Successfully assigned worker/oFHDnZHrDMo5WHnQkhcegx to node/5a684c93-84c0-4078-821c-a4aeccb61407
NORMAL  Scheduler  2024-06-25T12:26:59+0000  Successfully assigned worker/jQd38Z5HwRLv24x459CSBG to node/5a684c93-84c0-4078-821c-a4aeccb61407
Usage:
everai app events [-h] [-n [NAMESPACE]] [--output [OUTPUT]] name
Positional arguments:
nameThe app name
Options:
-h, --helpshow this help message and exit-n [NAMESPACE], --namespace [NAMESPACE]The namespace of app--output [OUTPUT], -o [OUTPUT]Output format, One of: (json, yaml, table, wide)
everai app worker (workers, w)
Manage the worker of app
Usage:
everai app worker [-h] {list,ls,exec} ...
Commands:
list (ls)List workers of appexecRun a command in a running worker
Options:
-h, --helpshow this help message and exit
everai app worker (workers, w) list (ls)
List workers of app
Example:
everai app worker list <your app name>
The output for this example is this, and CREATED_AT and DELETED_AT use UTC time display.
ID                      STATUS    DETAIL_STATUS    CREATED_AT                DELETED_AT
----------------------  --------  ---------------  ------------------------  ------------
4gexdRcjZyAwPGNeNFNHpr  RUNNING   FREE             2024-06-25T12:19:05+0000
mHFmmq7fJWWtERAyFDLrcA  RUNNING   FREE             2024-06-25T12:19:05+0000
If the app name is not attached, everai command line tool finds app name in app.py which is in current app directory.
everai app worker list
The output for this example is this:
ID                      STATUS    DETAIL_STATUS    CREATED_AT                DELETED_AT
----------------------  --------  ---------------  ------------------------  ------------
8UtmxyvQ4qC67awQMKDgJb  RUNNING   FREE             2024-06-26T08:54:23+0000
Usage:
everai app worker list [-h] [--output [OUTPUT]] [--all] [--recent-days [RECENT_DAYS]] [--namespace [NAMESPACE]] [app_name]
Positional arguments:
app_nameThe app name
Options:
-h, --helpshow this help message and exit--output [OUTPUT], -o [OUTPUT]Output format, One of: (json, yaml, table, wide)--all, -ashow all workers, include deleted and errors--recent-days [RECENT_DAYS], -d [RECENT_DAYS]show all workers created in recent days, include deleted and errors--namespace [NAMESPACE], -n [NAMESPACE]namespace of app
everai app worker exec
Run a command in a running worker
Example:
when you want to access the bash shell environment of the worker container, you can execute the following command:
everai app worker exec -it dweBRSPD395BvtBDsZYum8 bash
After the command is executed, the current terminal environment has entered the workspace directory in the worker container.
root@b0b6f096aeab:/workspace#
Usage:
everai app worker exec [-h] [--interactive] [--tty] worker command ...
Positional arguments:
workerworker idcommandcommandargsarguments for command in worker
Options:
-h, --helpshow this help message and exit--interactive, -iKeep STDIN open even if not attached--tty, -tAllocate a pseudo-TTY, just for compatible client, no effect
everai app check
Check whether app is correct in app directory
Example:
everai app check
If the code in the application directory has syntax errors, the following output will appear:
find object in app.py: 'Service' object has no attribute 'rout'
Usage:
everai app check [-h]
Options:
-h, --helpshow this help message and exit
everai app delete
Delete an app
Example:
everai app delete <your app name>
Usage:
everai app delete [-h] [--namespace [NAMESPACE]] [--force] name
Options:
-h, --helpshow this help message and exit--namespace [NAMESPACE], -n [NAMESPACE]The namespace of app--force